Class sjl.Queue
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sjl.Queue

java.lang.Object
   |
   +----sjl.Queue

public class Queue
extends Object
Queue is a container adapter that provides a first-in, first-out protocol to the elements in the container. The container must implement the QueueContainer interface. The List and Deque containers implements the QueueContainer interface.

Copyright © 1996 Finn Bock

See Also:
List, Deque

Constructor Index

 o Queue(QueueContainer)
Construct a new Queue based on the container argument.

Method Index

 o back()
Return the last element of the Queue.
 o empty()
Returns true if the queue does not contain any elements.
 o equals(Object)
Compare the elements in this container with the elements in another container.
 o front()
Return the first element of the Queue.
 o pop()
Returns and removes the top element on the queue.
 o push(Object)
Insert a new element on the top of the Queue..
 o size()
Returns the number of elements stored in the vector.

Constructors

 o Queue
  public Queue(QueueContainer container)
Construct a new Queue based on the container argument.

Methods

 o equals
  public boolean equals(Object container)
Compare the elements in this container with the elements in another container.
Returns:
true is the elements match.
Overrides:
equals in class Object
 o size
  public int size()
Returns the number of elements stored in the vector.
 o empty
  public boolean empty()
Returns true if the queue does not contain any elements.
 o pop
  public void pop()
Returns and removes the top element on the queue.
 o push
  public void push(Object o)
Insert a new element on the top of the Queue..
 o front
  public Object front()
Return the first element of the Queue. Undefined if the queue is empty.
 o back
  public Object back()
Return the last element of the Queue. Undefined if the queue is empty.

All Packages  Class Hierarchy  This Package  Previous  Next  Index